From: Keir Fraser Date: Thu, 17 Dec 2009 16:09:19 +0000 (+0000) Subject: x86_32: Build fixes after page-sharing patches. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12847 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=33d3cf8e10e50e0d6024dc0f118d663f215912a2;p=xen.git x86_32: Build fixes after page-sharing patches. Signed-off-by: Wei Yongjun --- diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 1625016a20..c9eb95bdbc 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -214,7 +214,7 @@ static void mem_sharing_hash_delete(shr_handle_t handle) pprev = &e->next; e = e->next; } - printk("Could not find shr entry for handle %lx\n", handle); + printk("Could not find shr entry for handle %"PRIx64"\n", handle); BUG(); } diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ab74323f4a..f614644a7d 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -2208,7 +2208,11 @@ void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt) mfn = l2e_get_pfn(l2e[i2]); /* Do not use get_gpfn_from_mfn because it may return SHARED_M2P_ENTRY */ - gfn = (i2 + (i3 + (i4 * L3_PAGETABLE_ENTRIES)) + gfn = (i2 + (i3 +#if CONFIG_PAGING_LEVELS >= 4 + + (i4 * L3_PAGETABLE_ENTRIES) +#endif + ) * L2_PAGETABLE_ENTRIES) * L1_PAGETABLE_ENTRIES; flags = p2m_type_to_flags(nt); l1e_content = l1e_from_pfn(mfn, flags | _PAGE_PSE); @@ -2226,7 +2230,11 @@ void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt) if ( p2m_flags_to_type(flags) != ot ) continue; mfn = l1e_get_pfn(l1e[i1]); - gfn = i1 + (i2 + (i3 + (i4 * L3_PAGETABLE_ENTRIES)) + gfn = i1 + (i2 + (i3 +#if CONFIG_PAGING_LEVELS >= 4 + + (i4 * L3_PAGETABLE_ENTRIES) +#endif + ) * L2_PAGETABLE_ENTRIES) * L1_PAGETABLE_ENTRIES; /* create a new 1le entry with the new type */ flags = p2m_type_to_flags(nt);